USE [VIETPUBLISHER]
GO

/****** Object:  Table [dbo].[T_BK_UserExtend]    Script Date: 06/14/2012 23:26:14 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[T_BK_UserExtend](
	[UserName] [nvarchar](256) NOT NULL,
	[UserID] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](30) NULL,
	[IsMale] [bit] NULL,
	[UseYN] [bit] NULL,
	[UpdateDate] [datetime] NULL,
	[UserTypes] [int] NULL,
	[BirthDate] [datetime] NULL,
	[MobilePhone] [varchar](20) NULL,
	[Email] [varchar](30) NULL,
	[Address] [nvarchar](100) NULL,
 CONSTRAINT [PK_UserExtend] PRIMARY KEY CLUSTERED 
(
	[UserName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[T_BK_UserExtend]  WITH CHECK ADD  CONSTRAINT [FK_UserExtend_UserTypes] FOREIGN KEY([UserTypes])
REFERENCES [dbo].[T_BK_UserType] ([UserTypeID])
GO

ALTER TABLE [dbo].[T_BK_UserExtend] CHECK CONSTRAINT [FK_UserExtend_UserTypes]
GO

ALTER TABLE [dbo].[T_BK_UserExtend] ADD  CONSTRAINT [DF_T_BK_UserExtend_IsMale]  DEFAULT ((1)) FOR [IsMale]
GO

ALTER TABLE [dbo].[T_BK_UserExtend] ADD  CONSTRAINT [DF_T_BK_UserExtend_UseYN]  DEFAULT ((1)) FOR [UseYN]
GO

ALTER TABLE [dbo].[T_BK_UserExtend] ADD  CONSTRAINT [DF_T_BK_UserExtend_UpdateDate]  DEFAULT (getdate()) FOR [UpdateDate]
GO

ALTER TABLE [dbo].[T_BK_UserExtend] ADD  CONSTRAINT [DF_T_BK_UserExtend_UserTypes]  DEFAULT ((1)) FOR [UserTypes]
GO


